Letters
date or time element
represents
Example
G
Era Marker
Text
AD
Y
Years
Year
1996; 96
M
Month of the Year
Month
July; Jul; 07
W
Number of weeks in the year
Number
27
W
Number of weeks in the month
Number
2
D
Number of days in the year
Number
189
D
Number of days in month
Number
Using System;2using System.Collections.Generic;3using System.Text;45namespace Xiao6{7/**////8///Create by Huanglin9///Class Program11 {static void Main (string[] args)13 {Try15 {DateTime D;DateTime Dnow;Dnow = System.DateTime.Now;String strdatetime = dnow.tostring ("Yyyymmddhhmmss");Console.WriteLine ("Current time (normal display):" + dnow.tostring ("yyyy mm month DD Day hh when mm minute ss seconds"));Console.WriteLine ("Current Time:" +strdatetime)
Public static boolean checkValidDate (String pDateObj ){
Try {
Int year = new Integer (pDateObj. substring (0, 4). intValue ();
Int month = new Integer (pDateObj. substring (4, 6). intValue ();
Int date = new Integer (pDateObj. substring (6, 8).
: Change the database parameter logretain, userexit, and trackmod to on. After that, the database is in the backup pending state. You must back up the database offline once and then perform online and Online Incremental backup.
Db2 update db cfg using logretain on userexit on trackmod on -- enable related parameters
-- Archive path
DB2 update database configuration using LOGARCHMETH1 DISK:/backup
-- Change the LOGARCHMETH1 parameter to TSM.
DB2 update database configuration using LOGARCHMETH1 TS
CFG using Logretain on UserExit in Trackmod on -Enable related parameters--Archive pathDB2 UPDATE DATABASE CONFIGURATION USING LOGARCHMETH1 disk:d:\db2\ IMMEDIATE--logarchmeth1 parameter changed to TSMDB2 UPDATE DATABASE CONFIGURATION USING LOGARCHMETH1 TSM IMMEDIATEDB2 Backup DB DBName [to D:\db2_backup] [use TSM] -Offline backupsDB2 Backup DB DBName online [to D:\db2_backup] [use TSM] -Online Line BackupDB2 Backup DB DBName online incremental [to d:\db2_backup] [use TSM] -Online incremental b
HH:MM:SS ' or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or in the context of a number.Mysql> Select Now ();' 1997-12-15 23:50:26 'Mysql> Select now () + 0;19971215235026
Unix_timestamp ()
Unix_timestamp (date)Returns a UNIX timestamp (the number of seconds from ' 1970-01-01 00:00:00 ' GMT) if no argument is called. If Unix_timestamp () is called with a date parameter, it returns the value of the second start
,cmtidORDER BY num DESC;Select Acm,dtype,porgcode,orgid,cmtid,count (1) as Num,avg (To_number (AVGT)) as Avgt,avg (To_number (loss)) as lossFrom ShujuGROUP BY Acm,dtype,porgcode,orgid,cmtidORDER BY num DESC;where To_date (ttime, ' Yyyymmddhhmmss ') =to_date (' 20141125 ', ' yyyyMMdd ')Select Ttime from Shuju order by ttime Desc;where To_date (ttime, ' Yyyymmddhhmmss ') =to_date (' 20141125 ', ' yyyyMMdd ')S
; SELECT EXTRACT (year from ' 1999-07-02 ');
-> 1999
Mysql> SELECT EXTRACT (year_month from ' 1999-07-02 01:02:03 ');
-> 199907
Mysql> SELECT EXTRACT (day_minute from ' 1999-07-02 01:02:03 ');
-> 20102
Mysql> SELECT EXTRACT (microsecond
-> from ' 2003-01-02 10:30:00.00123 ');
-> 123
From_days (N)Given a number of days N, returns a date value.
Mysql> SELECT from_days (729669);
-> ' 1997-10-07 '
Be careful when using from_days () to process old dates. He is not used to deal with the da
: Login IP or kernel. If you see: 0.0 or nothing, this means that the user is connected via a local terminal. In addition to restarting the activity, the kernel version is displayed in the status.Fourth column: Start timeFifth column: End time (still login in has not exited down until normal shutdown crash until shutdown is forced)Sixth column: DurationCommand syntax:Last [-R] [-num] [-N num] [-adiowx] [-f file] [-t YYYYMMDDHHMMSS] [name ...] [TTY ...
statement is closer to the standard SQL specification. Basic query syntax for Phoenix: SELECT *From Shuju; Select COUNT (1) from Shuju; Select Cmtid,count (1As num from Shuju GROUP by Cmtid ORDER by num DESC;
Select AVG (To_number (AVGT)) from Shuju; Select Cmtid,count (1As Num,avg (To_number (AVGT)) as Avgt,avg (To_number (loss)) as loss from Shuju group by Cmtid ORDER by num DESC; Select Acm,dtype,cmtid,count (1As Num,avg (To_number (AVGT)) as Avgt,avg (To_number (loss)) as loss from Shuju g
: DurationCommand syntax:last [-R] [-num] [ -n num ] [-adiowx] [ -f file ] [ -t YYYYMMDDHHMMSS ] [name...] [tty...]Command parameters:
Parameters
Long parameters
Description
-A
The host name or IP address that will be logged into the system, displayed in the last line
-D
Convert IP address to host name
-F
Specifies the record file, the default is to disp
Static voidMain25 Mobile number Lottery (string[] args) { //mobile number lottery, made by yourselfConsole.WriteLine ("Please enter the number of mobile phone number"); intn =Convert.ToInt32 (Console.ReadLine ()); string[] SJ =New string[n]; for(intSjhgs =0; Sjhgs ) {Console.WriteLine ("Please enter your phone number"); //string sjh = Console.ReadLine (); //uselessSj[sjhgs] = Console.ReadLine ();//set up an array of mobile phone numbers to hold the input phone number }
Package com.xcfh.util;Import Java.sql.Date;Import Java.text.SimpleDateFormat;/*** @Description: Long turns into time** @author Pinetree* @version 2.0* 2014-11-24*/public class Longtodate {/*** @Description: String type of milliseconds converted to date** @param lo Number of milliseconds* @return String YYYY-MM-DD HH:mm:ss*/public static string Stringtodate (String lo) {Long time = Long.parselong (LO);Date date = new Date (time);SimpleDateFormat sd = new SimpleDateFormat ("Yyyy-mm-dd HH:mm:ss");r
time value in 'hh: mm: ss' or hhmmss format, depending on whether the function is used in a string or in the context of a number.Mysql> select curtime ();-> '23: 50: 26'Mysql> select curtime () + 0;-> 235026
Now ()Sysdate ()Current_timestampReturns the current date and time in 'yyyy-MM-DD hh: mm: ss' or yyyymmddhhmmss format, depending on whether the function is in a string or in a numberThe context is used.Mysql> select now ();-> '2017-12-15 23:50:2
and display remote logon, such as ssh logon.
The utmp file stores the information of users in the current system.
The wtmp file stores the information of users who have logged on to the system.
Command output fields:
Column 1: User Name
Column 2: terminal location. Pts/0 (Pseudo Terminal) means the user remotely connected from SSH or telnet. tty (teletypewriter) means that the user is directly connected to the computer or local connection.
Column 3: logon ip address or kernel. If you see: 0.0 o
: logon ip address or kernel. If you see: 0.0 or nothing, it means that the user is connected through a local terminal. In addition to the restart activity, the kernel version is displayed in the status.
Column 4: Start Time
Column 5: End Time (still login has not exited down until crash is shut down normally until forced shutdown)
Column 6: Duration
Command syntax:
Last [-R] [-num] [-n num] [-adiowx] [-f file] [-t YYYYMMDDHHMMSS] [name...] [tty
):
YYYY-MM-DD HH: MM: SS or YY-MM-DD HH: MM: SS format string. Any symbol can be used as the delimiter between the date part and the time part. For example, "14-06-18 14:54:10", "14*06*18 14.54.10", and "14 + 06 + 18 14 = 54 = 10" are equivalent. For string values that contain date and time, if the values of month, day, hour, minute, and second are less than 10, you do not need to specify two digits. For example, "02:03:06" and "" are equivalent.
A string in the
I. hibernate-Java-SQL type ing table
Image version (easy to view ):
Table Version (easy to copy and paste ):
Basic hibernate type
Java type
Standard SQL Field Type
Size/Description
Big_decimal
Java. Math. bigdecimal
Numeric
Precision value (8 bits)
Binary
Byte []
Varbinary, blob
Variable-length binary data
Blob
Java. SQL. blob
Blob
Binary data
Boolean
Boolean/Java. Lang. Boolean
Bit
Boolea
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.